<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>2.扩展运算符</title>
	</head>
	<body>
		<script type="text/javascript" >
			let arr = [1,3,5,7,9]
			let obj = {x:1,y:2,z:{w:3}}

			//数据的解构赋值
			// const [,,c,d,e] = arr
			// console.log(c,d,e)

			//关于扩展运算符展开数组、对象的注意点
			// console.log(arr)
			// console.log(...arr)
			// console.log(obj)
			// console.log(...obj) //报错

			// let obj2 = {...obj} //浅拷贝
			// console.log(obj2.z === obj.z)

			// let obj01 = {a:1,b:2}
			// let obj02 = {y:0,...obj01}
			// let obj03 = {...obj01,a:9}
			// console.log(obj03)

		</script>
	</body>
</html>